package org.lee.springcloud.gateway;

import org.lee.springcloud.gateway.filters.TokenFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

/**
 * @author jackielee
 * @version 1.0
 * @description GatewayServiceZuulEurekAdvApplication
 * @date 2021/3/12
 */
@EnableZuulProxy
@SpringBootApplication
public class GatewayServiceZuulEurekAdvApplication {
  public static void main(String[] args) {
    SpringApplication.run(GatewayServiceZuulEurekAdvApplication.class, args);
  }

  /**
   * tokenFilter加入到请求拦截队列
   * @return
   */
  @Bean
  public TokenFilter tokenFilter() {
    return new TokenFilter();
  }
}
